package com;

import javax.imageio.ImageIO;
import java.awt.*;
import java.io.IOException;

public class ImageIOUtils {
    public static Image getImage(Object o,String path){
        try {
            return ImageIO.read(o.getClass().getClassLoader().getResourceAsStream(path));
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }
}
